package com.module02.demo03;


//用户套餐类
public class SubCallMenu extends Menu implements CallService {

    //特征
    private int callDuration;//通话时长
    private int messageNum;//短信条数

    public SubCallMenu(int monthlyCost, int callDuration, int messageNum) {
        super(monthlyCost);
        this.callDuration = callDuration;
        this.messageNum = messageNum;
    }

    public SubCallMenu() {
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getMessageNum() {
        return messageNum;
    }

    public void setMessageNum(int messageNum) {
        this.messageNum = messageNum;
    }

    //行为  显示所有套餐信息
    @Override
    public void show() {
        System.out.println("本卡套餐内通话时长：" + getCallDuration() + "分钟,短信条数：" + getMessageNum() + "条,每月资费：" + getMonthlyCost() + "元。");
    }



    @Override
    public void callService(int callDuration, PhoneCardType pct) {
        System.out.println("恭喜开通通话服务,本卡类型为:"+pct.getCARD_TYPE()+",套餐内通话时间有:"+callDuration+"分钟！");
    }
}

